package com.atguigu;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * projectName: com.atguigu
 *
 * @author: 赵伟风
 * description:
 */
@SpringBootApplication
public class BootRunner {

    public static void main(String[] args) {
        //启动tomcat + 创建ioc容器
        ConfigurableApplicationContext applicationContext = SpringApplication.run(BootRunner.class, args);

        String[] beanDefinitionNames = applicationContext.getBeanDefinitionNames();

        for (String beanDefinitionName : beanDefinitionNames) {
            System.out.println("组件名 = " + beanDefinitionName);
        }
    }
}
